const {createFeedback, findFeedback} = require("../controller/feedbackController")
const {ValidationError} = require("../utils/customError");

// 新增意见反馈
exports.addFeedback = (feedbackInfo)=> {
    if(!feedbackInfo.imgUrl && !feedbackInfo.feedbackText) throw new ValidationError("内容未填写或图片未上传")
    return createFeedback(feedbackInfo)
}

// 分页查询
exports.queryFeedback = (queryCondition)=> {
    return findFeedback(queryCondition);
}


